<template>
    MyRight组件
    <div></div>
</template>

<script setup>
import {onActivated,onDeactivated} from 'vue';
onActivated(()=>{
    console.log('MyRight组件激活')
})
onDeactivated(()=>{
    console.log('MyRight组件停用')
})
</script>